from flask_script import Manager
from flask_migrate import Migrate, MigrateCommand
from toutiao import app, db

# 把 Manager 类和应用程序实例进行关联
manager = Manager(app)

# 迁移配置
Migrate(app=app, db=db)

manager.add_command('db', MigrateCommand)


if __name__ == '__main__':
    manager.run()